package com.example.ycdyus.dailyfruit.utils;

import com.example.ycdyus.dailyfruit.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;

/**
 * Created by ycdyus on 2015/10/4.
 */
public class ImageLoaderHelper {
    public  static DisplayImageOptions getDisplayImageLoader() {
        return new DisplayImageOptions.Builder()
                .showImageOnLoading(R.mipmap.loading)
                .showImageOnFail(R.mipmap.nullpicture)
                .showImageForEmptyUri(R.mipmap.nullpicture).cacheInMemory(true)
                .cacheOnDisk(true).displayer(new RoundedBitmapDisplayer(0))
                .build();
    }
//    public  static DisplayImageOptions getDisplayImageLoaderForUserPic() {
//        return new DisplayImageOptions.Builder()
//                .showImageOnLoading(R.mipmap.ic_default_avatar)
//                .showImageOnFail(R.mipmap.ic_default_avatar)
//                .showImageForEmptyUri(R.mipmap.ic_default_avatar).cacheInMemory(true)
//                .cacheOnDisk(true).displayer(new RoundedBitmapDisplayer(20))
//                .build();
//    }
}
